using UnityEngine;

public class ZooLevelEnd : MonoBehaviour
{
    bool triggered;

    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") && !triggered)
        {
            triggered = true;
            Debug.Log("[ZooLevelEnd] Player reached the end!");
            ZooUIController.instance.ContinueButton();
            Invoke("StopCharacter", 1);
            ZooMusicManager.Instance.PlaySFX(7);
        }
    }

    void StopCharacter()
    {
        ZooCharacterController.instance.StopChar();
    }
}
